package aula_try_catch;

public class Main {

	public static void main(String[] args) {
		CalculadoraSimples cs = new CalculadoraSimples();

		for (int i = -5; i <= 5; i++) {
			System.out.println(cs.multiplicar(5, i));
			try {
				System.out.println(cs.dividir(5, i));
			} catch (ErroCalcSimples e) {
				System.out.println(e.getMessage());
			} finally {
				System.out.println("I: " + i);
			}
		}
	}

}

// }
/*
 * CalculadoraSimples c1 = new CalculadoraSimples(); for(int i=-5; i<=5;i++) {
 * System.out.println(c1.multiplicar(5, i)); try {
 * System.out.println(c1.dividir(5, i)); } catch (ErroCalc e1) {
 * System.out.println(e1.getMessage()); }finally { System.out.println("I: "+i);
 * }
 */